<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>本月新增会员数量</title>
  <script src="http://echarts.baidu.com/dist/echarts.js"></script>
</head>
<body>
<div style="text-align: center;">本月新增会员数量</div>
<div id="main" style="width: 600px;height:400px;"></div>
</body>
</html>
<script>
    var myChart = echarts.init(document.getElementById('main'));
    myChart.title = '本月新增会员数量';
    option = {
        tooltip: {
            trigger: 'axis',
            axisPointer: {
                type: 'cross',
                crossStyle: {
                    color: '#999'
                }
            }
        },
        toolbox: {
            feature: {
                dataView: {show: true, readOnly: false},
                magicType: {show: true, type: ['line', 'bar']},
                restore: {show: true},
                saveAsImage: {show: true}
            }
        },
        legend: {
            data:['会员数量']
        },
        xAxis: [
            {
                type: 'category',
                data: {$days},
                axisPointer: {
                    type: 'shadow'
                }
            }
        ],
        yAxis: [
            {
                type: 'value',
                name: '会员数/个',
                min: 0,
                max: {$max_num},
                interval: 100,
                axisLabel: {
                    formatter: '{value} '
                }
            }
        ],
        series: [
            {
                name:'会员数量',
                type:'line',
                data:{$totalnum}
            }
        ]
    };

    // 使用刚指定的配置项和数据显示图表。
    myChart.setOption(option);
</script>